package com.org.service.impl;

import com.org.entity.LoginRequest;
import com.org.mapper.UserMapper;
import com.org.service.LoginService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Rainy-Heights
 * @version 1.0
 * @Date 2023/3/7 9:26
 */
@Service
public class LoginServiceImpl implements LoginService {
    @Resource
    UserMapper userMapper;

    @Override
    public boolean getLoginOrNot(LoginRequest loginRequest) {
       return (userMapper.getLoginOrNot(loginRequest.getUsername(), loginRequest.getPassword())) != null;
    }
}
